
package com.tjd.uploaddemo.utils;

/**
 * Description: <br/>
 * Date: 2019年3月26日 下午3:42:17 <br/>
 * 
 * @author Mark
 * @version
 * @see
 */
public class Dto<T> extends BaseDto {

    private static final long serialVersionUID = 5244245478274283431L;

    public static final Dto<Object> SUCCESS = new Dto<Object>(new Object());

    /**
     * 快速构造一个错误消息
     */
    public static <T> Dto<T> error(String errorMsg) {
        Dto<T> dto = new Dto<T>();
        dto.errorMsg(errorMsg);
        return dto;
    }

    private T data;

    public Dto() {
    }

    public Dto(T t) {
        this.data = t;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
